/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kn.mx.cstf2.sql;

/**
 *
 * @author user1
 */
public class MainSql {
    
    public static final String SELECCIONAR_IDyKNKEY;
    
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT tt.id, tt.knkey "+
            "FROM joinusertransition as ju "+
            "INNER JOIN t_transitions as tt ON "+
            "ju.idtransition = tt.id "+
            "WHERE "+
            "ju.iduser= ? ");
        SELECCIONAR_IDyKNKEY = qryBuilder.toString();
     }
     
     public static final String SELECCIONAR_KNKEY;
    
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT c.companyname||'-'||uc.customernum "
                + "FROM c_users_vs_clientes uc "
                + "INNER JOIN t_clientes c ON c.knkey = uc.customernum "
                + "WHERE uc.winuser LIKE ? "
                + "ORDER BY 1;");
        SELECCIONAR_KNKEY = qryBuilder.toString();
     }
    
     public static final String UPDATEFALSE;
    
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE t_transitions SET updated = FALSE WHERE knkey = ?");
        UPDATEFALSE = qryBuilder.toString();
     }
     
     public static final String UPDATE1FALSE;
    
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE t_transitions SET updated1 = FALSE WHERE knkey = ?");
        UPDATE1FALSE = qryBuilder.toString();
     }
     
     public static final String UPDATETRUE;
    
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE t_transitions SET updated = TRUE WHERE knkey = ?");
        UPDATETRUE = qryBuilder.toString();
     }
     
     public static final String UPDATE1TRUE;
    
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE t_transitions SET updated1 = TRUE WHERE knkey = ?");
        UPDATE1TRUE = qryBuilder.toString();
     }
     
     
     
     public static final String SELECT_KNKEY;
     
     static {
        StringBuilder qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT knkey ,companyname, creationdate FROM t_clientes  WHERE knkey = ? ");
        SELECT_KNKEY = qryBuilder.toString();
     }
     
public static final String SELECCIONAR_RESTDATA1 ;
     
     static {
    	 StringBuilder qryBuilder = new StringBuilder();
         qryBuilder.append("select status, statusimple, updated1 from t_transitions where knkey = ? ");
         SELECCIONAR_RESTDATA1 = qryBuilder.toString();
     }
     
     
}
